import request from "@/utils/request";



let getStaff = (page = 1, size = 5, data) => {
    return request({
        url: `/staff/list/${page}/${size}`,
        method: 'GET',
        params: data
    })
}



let addStaff = (data) => {
    return request({
        url: '/staff',
        method: 'POST',
        data
    })
}



let delStaff = (id) => {
    return request({
        url: `/staff/${id}`,
        method: 'DELETE',
    })
}



let searchStaff = (id) => {
    return request({
        url: `/staff/${id}`,
        method: 'GET',
    })
}




let editStaff = (id, data) => {
    return request({
        url: `/staff/${id}`,
        method: 'PUT',
        data
    })
}




export default {
    getStaff,
    addStaff,
    delStaff,
    searchStaff,
    editStaff
}